<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::QpBoxLinear&lt; InputT &gt; Class Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_qp_box_linear.html">QpBoxLinear</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_qp_box_linear-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle"><div class="title">shark::QpBoxLinear&lt; InputT &gt; Class Template Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Quadratic program solver for box-constrained problems with linear kernel.  
 <a href="classshark_1_1_qp_box_linear.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_qp_box_linear_8h_source.html">shark/Algorithms/QP/QpBoxLinear.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a5f5ee4e503f9d387f657f41a43297e71" id="r_a5f5ee4e503f9d387f657f41a43297e71"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; InputT, unsigned int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_box_linear.html#a5f5ee4e503f9d387f657f41a43297e71">DatasetType</a></td></tr>
<tr class="separator:a5f5ee4e503f9d387f657f41a43297e71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a696d6a324ef267b80dcfa3133a13a341" id="r_a696d6a324ef267b80dcfa3133a13a341"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; InputT, unsignedint &gt;::const_element_reference&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_box_linear.html#a696d6a324ef267b80dcfa3133a13a341">ElementType</a></td></tr>
<tr class="separator:a696d6a324ef267b80dcfa3133a13a341"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad4964a8fe4aaba27dca214bf956ef481" id="r_ad4964a8fe4aaba27dca214bf956ef481"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_box_linear.html#ad4964a8fe4aaba27dca214bf956ef481">QpBoxLinear</a> (const <a class="el" href="classshark_1_1_qp_box_linear.html#a5f5ee4e503f9d387f657f41a43297e71">DatasetType</a> &amp;dataset, std::size_t dim)</td></tr>
<tr class="memdesc:ad4964a8fe4aaba27dca214bf956ef481"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <br /></td></tr>
<tr class="separator:ad4964a8fe4aaba27dca214bf956ef481"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40ff9688a83628fbb9691f0973ea2e4b" id="r_a40ff9688a83628fbb9691f0973ea2e4b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_box_linear.html#a40ff9688a83628fbb9691f0973ea2e4b">setOffset</a> (double newOffset)</td></tr>
<tr class="separator:a40ff9688a83628fbb9691f0973ea2e4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3dce83db17b67190bd6730e44cdb773e" id="r_a3dce83db17b67190bd6730e44cdb773e"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_box_linear.html#a3dce83db17b67190bd6730e44cdb773e">offsetGradient</a> () const</td></tr>
<tr class="separator:a3dce83db17b67190bd6730e44cdb773e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6db58d9b283d570485001ae03a9b0b87" id="r_a6db58d9b283d570485001ae03a9b0b87"><td class="memItemLeft" align="right" valign="top">RealVector const &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_box_linear.html#a6db58d9b283d570485001ae03a9b0b87">solutionWeightVector</a> () const</td></tr>
<tr class="separator:a6db58d9b283d570485001ae03a9b0b87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8274b4499b2b4c342735a3ab338e2fb" id="r_ab8274b4499b2b4c342735a3ab338e2fb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_box_linear.html#ab8274b4499b2b4c342735a3ab338e2fb">solve</a> (double bound, double reg, <a class="el" href="structshark_1_1_qp_stopping_condition.html">QpStoppingCondition</a> &amp;stop, <a class="el" href="structshark_1_1_qp_solution_properties.html">QpSolutionProperties</a> *prop=NULL, bool verbose=false)</td></tr>
<tr class="memdesc:ab8274b4499b2b4c342735a3ab338e2fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Solve the SVM training problem.  <br /></td></tr>
<tr class="separator:ab8274b4499b2b4c342735a3ab338e2fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a34abab91280fd4241fcd454de20149ba" id="r_a34abab91280fd4241fcd454de20149ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classshark_1_1_data_view.html">DataView</a>&lt; const <a class="el" href="classshark_1_1_qp_box_linear.html#a5f5ee4e503f9d387f657f41a43297e71">DatasetType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_box_linear.html#a34abab91280fd4241fcd454de20149ba">m_data</a></td></tr>
<tr class="memdesc:a34abab91280fd4241fcd454de20149ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">view on training data  <br /></td></tr>
<tr class="separator:a34abab91280fd4241fcd454de20149ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acaabcca91e016569f345712678d2aa28" id="r_acaabcca91e016569f345712678d2aa28"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_box_linear.html#acaabcca91e016569f345712678d2aa28">m_dim</a></td></tr>
<tr class="memdesc:acaabcca91e016569f345712678d2aa28"><td class="mdescLeft">&#160;</td><td class="mdescRight">input space dimension  <br /></td></tr>
<tr class="separator:acaabcca91e016569f345712678d2aa28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78c4ce2d9151c4b7014e5850d0125171" id="r_a78c4ce2d9151c4b7014e5850d0125171"><td class="memItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_box_linear.html#a78c4ce2d9151c4b7014e5850d0125171">m_xSquared</a></td></tr>
<tr class="memdesc:a78c4ce2d9151c4b7014e5850d0125171"><td class="mdescLeft">&#160;</td><td class="mdescRight">diagonal entries of the quadratic matrix  <br /></td></tr>
<tr class="separator:a78c4ce2d9151c4b7014e5850d0125171"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af77735b134d075719f94fe773b3f1232" id="r_af77735b134d075719f94fe773b3f1232"><td class="memItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_box_linear.html#af77735b134d075719f94fe773b3f1232">m_alpha</a></td></tr>
<tr class="memdesc:af77735b134d075719f94fe773b3f1232"><td class="mdescLeft">&#160;</td><td class="mdescRight">storage of the m_alpha values for warm start  <br /></td></tr>
<tr class="separator:af77735b134d075719f94fe773b3f1232"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83c9d19b5cde386a1236928a7ffd94b4" id="r_a83c9d19b5cde386a1236928a7ffd94b4"><td class="memItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_box_linear.html#a83c9d19b5cde386a1236928a7ffd94b4">m_weights</a></td></tr>
<tr class="memdesc:a83c9d19b5cde386a1236928a7ffd94b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">storage of weight vector for warm start  <br /></td></tr>
<tr class="separator:a83c9d19b5cde386a1236928a7ffd94b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98f0b8dd922bc1abdd26760f9d1de488" id="r_a98f0b8dd922bc1abdd26760f9d1de488"><td class="memItemLeft" align="right" valign="top">RealVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_box_linear.html#a98f0b8dd922bc1abdd26760f9d1de488">m_pref</a></td></tr>
<tr class="memdesc:a98f0b8dd922bc1abdd26760f9d1de488"><td class="mdescLeft">&#160;</td><td class="mdescRight">measure of success of individual steps  <br /></td></tr>
<tr class="separator:a98f0b8dd922bc1abdd26760f9d1de488"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a285997ddc6b5d29ce7d22dc999032823" id="r_a285997ddc6b5d29ce7d22dc999032823"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_qp_box_linear.html#a285997ddc6b5d29ce7d22dc999032823">m_offset</a></td></tr>
<tr class="separator:a285997ddc6b5d29ce7d22dc999032823"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class InputT&gt;<br />
class shark::QpBoxLinear&lt; InputT &gt;</div><p>Quadratic program solver for box-constrained problems with linear kernel. </p>
<dl class="section user"><dt></dt><dd>The <a class="el" href="classshark_1_1_qp_box_linear.html" title="Quadratic program solver for box-constrained problems with linear kernel.">QpBoxLinear</a> class is a decomposition-based solver for linear support vector machine classifiers trained with the hinge loss. Its optimization is largely based on the paper<br  />
 "A Dual Coordinate Descent Method for Large-scale Linear SVM" by Hsieh, Chang, and Lin, ICML, 2007. However, the present algorithm differs quite a bit, since it learns variable preferences as a replacement for the missing working set selection. At the same time, this method replaces the shrinking heuristic. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_qp_box_linear_8h_source.html#l00067">67</a> of file <a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a5f5ee4e503f9d387f657f41a43297e71" name="a5f5ee4e503f9d387f657f41a43297e71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f5ee4e503f9d387f657f41a43297e71">&#9670;&#160;</a></span>DatasetType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt;InputT, unsigned int&gt; <a class="el" href="classshark_1_1_qp_box_linear.html">shark::QpBoxLinear</a>&lt; InputT &gt;::DatasetType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_qp_box_linear_8h_source.html#l00070">70</a> of file <a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a>.</p>

</div>
</div>
<a id="a696d6a324ef267b80dcfa3133a13a341" name="a696d6a324ef267b80dcfa3133a13a341"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a696d6a324ef267b80dcfa3133a13a341">&#9670;&#160;</a></span>ElementType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt;InputT,unsignedint&gt;::const_element_reference <a class="el" href="classshark_1_1_qp_box_linear.html">shark::QpBoxLinear</a>&lt; InputT &gt;::ElementType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_qp_box_linear_8h_source.html#l00071">71</a> of file <a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ad4964a8fe4aaba27dca214bf956ef481" name="ad4964a8fe4aaba27dca214bf956ef481"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4964a8fe4aaba27dca214bf956ef481">&#9670;&#160;</a></span>QpBoxLinear()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_qp_box_linear.html">shark::QpBoxLinear</a>&lt; InputT &gt;::QpBoxLinear </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classshark_1_1_qp_box_linear.html#a5f5ee4e503f9d387f657f41a43297e71">DatasetType</a> &amp;&#160;</td>
          <td class="paramname"><em>dataset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>dim</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dataset</td><td>training data </td></tr>
    <tr><td class="paramname">dim</td><td>problem dimension </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_qp_box_linear_8h_source.html#l00079">79</a> of file <a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_qp_box_linear.html#a34abab91280fd4241fcd454de20149ba">shark::QpBoxLinear&lt; InputT &gt;::m_data</a>, <a class="el" href="classshark_1_1_qp_box_linear.html#a78c4ce2d9151c4b7014e5850d0125171">shark::QpBoxLinear&lt; InputT &gt;::m_xSquared</a>, and <a class="el" href="_exception_8h.html#a73abb5049a0168d72a48e72dda41708b">SHARK_ASSERT</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a3dce83db17b67190bd6730e44cdb773e" name="a3dce83db17b67190bd6730e44cdb773e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3dce83db17b67190bd6730e44cdb773e">&#9670;&#160;</a></span>offsetGradient()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="classshark_1_1_qp_box_linear.html">shark::QpBoxLinear</a>&lt; InputT &gt;::offsetGradient </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_qp_box_linear_8h_source.html#l00103">103</a> of file <a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_qp_box_linear.html#af77735b134d075719f94fe773b3f1232">shark::QpBoxLinear&lt; InputT &gt;::m_alpha</a>, and <a class="el" href="classshark_1_1_qp_box_linear.html#a34abab91280fd4241fcd454de20149ba">shark::QpBoxLinear&lt; InputT &gt;::m_data</a>.</p>

</div>
</div>
<a id="a40ff9688a83628fbb9691f0973ea2e4b" name="a40ff9688a83628fbb9691f0973ea2e4b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40ff9688a83628fbb9691f0973ea2e4b">&#9670;&#160;</a></span>setOffset()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_qp_box_linear.html">shark::QpBoxLinear</a>&lt; InputT &gt;::setOffset </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>newOffset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_qp_box_linear_8h_source.html#l00099">99</a> of file <a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_qp_box_linear.html#a285997ddc6b5d29ce7d22dc999032823">shark::QpBoxLinear&lt; InputT &gt;::m_offset</a>.</p>

</div>
</div>
<a id="a6db58d9b283d570485001ae03a9b0b87" name="a6db58d9b283d570485001ae03a9b0b87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6db58d9b283d570485001ae03a9b0b87">&#9670;&#160;</a></span>solutionWeightVector()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector const  &amp; <a class="el" href="classshark_1_1_qp_box_linear.html">shark::QpBoxLinear</a>&lt; InputT &gt;::solutionWeightVector </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_qp_box_linear_8h_source.html#l00112">112</a> of file <a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_qp_box_linear.html#a83c9d19b5cde386a1236928a7ffd94b4">shark::QpBoxLinear&lt; InputT &gt;::m_weights</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_squared_hinge_linear_c_svm_trainer.html#a9c7df5c98dee200e4214abac74ad3bab">shark::SquaredHingeLinearCSvmTrainer&lt; InputType &gt;::train()</a>.</p>

</div>
</div>
<a id="ab8274b4499b2b4c342735a3ab338e2fb" name="ab8274b4499b2b4c342735a3ab338e2fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8274b4499b2b4c342735a3ab338e2fb">&#9670;&#160;</a></span>solve()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_qp_box_linear.html">shark::QpBoxLinear</a>&lt; InputT &gt;::solve </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>bound</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structshark_1_1_qp_stopping_condition.html">QpStoppingCondition</a> &amp;&#160;</td>
          <td class="paramname"><em>stop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structshark_1_1_qp_solution_properties.html">QpSolutionProperties</a> *&#160;</td>
          <td class="paramname"><em>prop</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>verbose</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Solve the SVM training problem. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bound</td><td>upper bound for m_alpha-components, complexity parameter of the hinge loss SVM </td></tr>
    <tr><td class="paramname">reg</td><td>coefficient of the penalty term \(-\frac{reg}{2} \cdot \|\m_alpha\|^2\), reg=1/C where C is the complexity parameter of the squared hinge loss SVM </td></tr>
    <tr><td class="paramname">stop</td><td>stopping condition(s) </td></tr>
    <tr><td class="paramname">prop</td><td>solution properties </td></tr>
    <tr><td class="paramname">verbose</td><td>if true, the solver prints status information and solution statistics </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_qp_box_linear_8h_source.html#l00125">125</a> of file <a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a>.</p>

<p class="reference">References <a class="el" href="namespaceshark_1_1random.html#ada5e9e6fd77534e1d99479213e5fed50">shark::random::coinToss()</a>, <a class="el" href="namespaceshark_1_1random.html#ab5c1547eee483974d008d43f621a2234">shark::random::globalRng</a>, <a class="el" href="classshark_1_1_timer.html#a91e2a527ffbe3eabc7c8cf36ff742318">shark::Timer::lastLap()</a>, <a class="el" href="classshark_1_1_qp_box_linear.html#af77735b134d075719f94fe773b3f1232">shark::QpBoxLinear&lt; InputT &gt;::m_alpha</a>, <a class="el" href="classshark_1_1_qp_box_linear.html#a34abab91280fd4241fcd454de20149ba">shark::QpBoxLinear&lt; InputT &gt;::m_data</a>, <a class="el" href="classshark_1_1_qp_box_linear.html#a285997ddc6b5d29ce7d22dc999032823">shark::QpBoxLinear&lt; InputT &gt;::m_offset</a>, <a class="el" href="classshark_1_1_qp_box_linear.html#a98f0b8dd922bc1abdd26760f9d1de488">shark::QpBoxLinear&lt; InputT &gt;::m_pref</a>, <a class="el" href="classshark_1_1_qp_box_linear.html#a83c9d19b5cde386a1236928a7ffd94b4">shark::QpBoxLinear&lt; InputT &gt;::m_weights</a>, <a class="el" href="classshark_1_1_qp_box_linear.html#a78c4ce2d9151c4b7014e5850d0125171">shark::QpBoxLinear&lt; InputT &gt;::m_xSquared</a>, <a class="el" href="structshark_1_1_qp_stopping_condition.html#af747ff263a208a610fc2ca4dccec44d6">shark::QpStoppingCondition::maxIterations</a>, <a class="el" href="structshark_1_1_qp_stopping_condition.html#a2f2037cc62c817ff88ec0801591a0240">shark::QpStoppingCondition::maxSeconds</a>, <a class="el" href="structshark_1_1_qp_stopping_condition.html#addc2ea7f6d15eb25187586e329f33ace">shark::QpStoppingCondition::minAccuracy</a>, <a class="el" href="namespaceshark.html#a2d5e9a415ae7e8dd41caf883e1873540a4b605bae89750d1c2bb1b3ef1a039639">shark::QpAccuracyReached</a>, <a class="el" href="namespaceshark.html#a2d5e9a415ae7e8dd41caf883e1873540a1f2d9c58ed6b0985decbfe573d66080d">shark::QpMaxIterationsReached</a>, <a class="el" href="namespaceshark.html#a2d5e9a415ae7e8dd41caf883e1873540af0f960c500ba6a3c653c9f45efa6e92a">shark::QpTimeout</a>, <a class="el" href="_exception_8h.html#a73abb5049a0168d72a48e72dda41708b">SHARK_ASSERT</a>, and <a class="el" href="classshark_1_1_timer.html#ad3ccd47c0429d28d9600117b5ed57362">shark::Timer::stop()</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_squared_hinge_linear_c_svm_trainer.html#a9c7df5c98dee200e4214abac74ad3bab">shark::SquaredHingeLinearCSvmTrainer&lt; InputType &gt;::train()</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="af77735b134d075719f94fe773b3f1232" name="af77735b134d075719f94fe773b3f1232"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af77735b134d075719f94fe773b3f1232">&#9670;&#160;</a></span>m_alpha</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector <a class="el" href="classshark_1_1_qp_box_linear.html">shark::QpBoxLinear</a>&lt; InputT &gt;::m_alpha</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>storage of the m_alpha values for warm start </p>

<p class="definition">Definition at line <a class="el" href="_qp_box_linear_8h_source.html#l00329">329</a> of file <a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_box_linear.html#a3dce83db17b67190bd6730e44cdb773e">shark::QpBoxLinear&lt; InputT &gt;::offsetGradient()</a>, and <a class="el" href="classshark_1_1_qp_box_linear.html#ab8274b4499b2b4c342735a3ab338e2fb">shark::QpBoxLinear&lt; InputT &gt;::solve()</a>.</p>

</div>
</div>
<a id="a34abab91280fd4241fcd454de20149ba" name="a34abab91280fd4241fcd454de20149ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34abab91280fd4241fcd454de20149ba">&#9670;&#160;</a></span>m_data</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classshark_1_1_data_view.html">DataView</a>&lt;const <a class="el" href="classshark_1_1_qp_box_linear.html#a5f5ee4e503f9d387f657f41a43297e71">DatasetType</a>&gt; <a class="el" href="classshark_1_1_qp_box_linear.html">shark::QpBoxLinear</a>&lt; InputT &gt;::m_data</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>view on training data </p>

<p class="definition">Definition at line <a class="el" href="_qp_box_linear_8h_source.html#l00326">326</a> of file <a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_box_linear.html#a3dce83db17b67190bd6730e44cdb773e">shark::QpBoxLinear&lt; InputT &gt;::offsetGradient()</a>, <a class="el" href="classshark_1_1_qp_box_linear.html#ad4964a8fe4aaba27dca214bf956ef481">shark::QpBoxLinear&lt; InputT &gt;::QpBoxLinear()</a>, and <a class="el" href="classshark_1_1_qp_box_linear.html#ab8274b4499b2b4c342735a3ab338e2fb">shark::QpBoxLinear&lt; InputT &gt;::solve()</a>.</p>

</div>
</div>
<a id="acaabcca91e016569f345712678d2aa28" name="acaabcca91e016569f345712678d2aa28"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acaabcca91e016569f345712678d2aa28">&#9670;&#160;</a></span>m_dim</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t <a class="el" href="classshark_1_1_qp_box_linear.html">shark::QpBoxLinear</a>&lt; InputT &gt;::m_dim</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>input space dimension </p>

<p class="definition">Definition at line <a class="el" href="_qp_box_linear_8h_source.html#l00327">327</a> of file <a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a>.</p>

</div>
</div>
<a id="a285997ddc6b5d29ce7d22dc999032823" name="a285997ddc6b5d29ce7d22dc999032823"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a285997ddc6b5d29ce7d22dc999032823">&#9670;&#160;</a></span>m_offset</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="classshark_1_1_qp_box_linear.html">shark::QpBoxLinear</a>&lt; InputT &gt;::m_offset</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_qp_box_linear_8h_source.html#l00332">332</a> of file <a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_box_linear.html#a40ff9688a83628fbb9691f0973ea2e4b">shark::QpBoxLinear&lt; InputT &gt;::setOffset()</a>, and <a class="el" href="classshark_1_1_qp_box_linear.html#ab8274b4499b2b4c342735a3ab338e2fb">shark::QpBoxLinear&lt; InputT &gt;::solve()</a>.</p>

</div>
</div>
<a id="a98f0b8dd922bc1abdd26760f9d1de488" name="a98f0b8dd922bc1abdd26760f9d1de488"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a98f0b8dd922bc1abdd26760f9d1de488">&#9670;&#160;</a></span>m_pref</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector <a class="el" href="classshark_1_1_qp_box_linear.html">shark::QpBoxLinear</a>&lt; InputT &gt;::m_pref</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>measure of success of individual steps </p>

<p class="definition">Definition at line <a class="el" href="_qp_box_linear_8h_source.html#l00331">331</a> of file <a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_box_linear.html#ab8274b4499b2b4c342735a3ab338e2fb">shark::QpBoxLinear&lt; InputT &gt;::solve()</a>.</p>

</div>
</div>
<a id="a83c9d19b5cde386a1236928a7ffd94b4" name="a83c9d19b5cde386a1236928a7ffd94b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83c9d19b5cde386a1236928a7ffd94b4">&#9670;&#160;</a></span>m_weights</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector <a class="el" href="classshark_1_1_qp_box_linear.html">shark::QpBoxLinear</a>&lt; InputT &gt;::m_weights</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>storage of weight vector for warm start </p>

<p class="definition">Definition at line <a class="el" href="_qp_box_linear_8h_source.html#l00330">330</a> of file <a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_box_linear.html#a6db58d9b283d570485001ae03a9b0b87">shark::QpBoxLinear&lt; InputT &gt;::solutionWeightVector()</a>, and <a class="el" href="classshark_1_1_qp_box_linear.html#ab8274b4499b2b4c342735a3ab338e2fb">shark::QpBoxLinear&lt; InputT &gt;::solve()</a>.</p>

</div>
</div>
<a id="a78c4ce2d9151c4b7014e5850d0125171" name="a78c4ce2d9151c4b7014e5850d0125171"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78c4ce2d9151c4b7014e5850d0125171">&#9670;&#160;</a></span>m_xSquared</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector <a class="el" href="classshark_1_1_qp_box_linear.html">shark::QpBoxLinear</a>&lt; InputT &gt;::m_xSquared</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>diagonal entries of the quadratic matrix </p>

<p class="definition">Definition at line <a class="el" href="_qp_box_linear_8h_source.html#l00328">328</a> of file <a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_box_linear.html#ad4964a8fe4aaba27dca214bf956ef481">shark::QpBoxLinear&lt; InputT &gt;::QpBoxLinear()</a>, and <a class="el" href="classshark_1_1_qp_box_linear.html#ab8274b4499b2b4c342735a3ab338e2fb">shark::QpBoxLinear&lt; InputT &gt;::solve()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Algorithms/QP/<a class="el" href="_qp_box_linear_8h_source.html">QpBoxLinear.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
